﻿
namespace MiniMusicPlayer.Classes
{
    using System.Collections.ObjectModel;

    public class ActualSong
    {
        public Playlist Playlist { get; private set; }

        private int actual;

        public Song Actual { get; private set; } 

        public ActualSong(Playlist playlist)
        {
            this.Playlist = playlist;
            this.Playlist.ShuffledSongs.CollectionChanged += this.SongCollectionChanged;
        }

        private void SongCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            
        }

        public Song NextSong()
        {
            actual++;
            if (this.actual < this.Playlist.ShuffledSongs.Count)
            {
                return this.Actual = this.Playlist.ShuffledSongs[this.actual];
            }
        }
    }
}
